
<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="">Home</a> <span class="divider">/</span></li>
        <li class="active">Static Infomation</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Fanpage & Hotline</h1> <span></span>
</div><!--pagetitle-->

<div class="maincontent">
<?php if(validation_errors()): ?>
    <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
      <button data-dismiss="alert" class="close" type="button">×</button>
      <?php echo validation_errors(); ?>
    </div>
<?php endif;?>
	<div class="contentinner content-dashboard">
    
    <?php $attr = array('class' => 'stdform'); echo form_open('', $attr)?>
        <div class="appendhere">
        <?php $i = 1; foreach($data AS $key => $val):?>
            <p>
                <?php if($i === 1):?>
                    <label>Chọn Tỉnh/Thành phố</label>
                    <?php echo $fview->selectTypes($listProvince, $val['id'], 'province[]');?>
                <?php else:?>
                    <label></label>
                    <?php echo $fview->selectTypes($listProvince, $val['id'], 'province[]');?>
                    <button type="button" class="btn btn-delete"><i class="icon-remove"></i></button>
                <?php endif;?> 
                <button type="button" class="btn btn-plus"><i class="iconfa-plus"></i></button>
            </p>
        <?php $i++; endforeach;?>
        </div>
        <p>
            <label></label>
            <button class="btn btn-rounded" type="submit"> <i class="iconfa-ok"></i> &nbsp; Lưu</button>
        </p>
    </form>
    
    </div>
</div>
<style type="text/css">
    .contentinner p .btn-plus{
        display: none;
    }
    .contentinner p:nth-last-child(1) .btn-plus{
        display: inline-block;
    }
</style>
<script type="text/javascript">
    $(document).on('click', '.btn-plus', function(){
        $.ajax({
            type: "GET",
            url: "<?php echo site_url('manage/static/add-select-province')?>",
            success: function(data){
                $('.appendhere').append(data);
            }
        });
    });
    $(document).on('click', '.btn-delete', function(){
        $(this).parent('p').remove();
    });
</script>